package src;

import java.io.File;

/**
 * Created by dell on 2017/8/7.
 */
public class FilenameFilterTest {
    public static void main(String[] args) {
        File file=new File(".");
        String[] nameList=file.list(((dir, name) -> name.endsWith(".java")||new File(name).isDirectory()));
        for (String result:nameList){
            System.out.println(result);
        }
    }
}
